import { RequestMethod } from "./src/request/RequestMethod";
import { ContentType } from "./src/request/ContentType";
import { Request } from "./src/request/XhrRequest";


window.EGet = function(url: string,data?: any){
    let request = new Request(url,ContentType.APPLICATION_URLENCODED,RequestMethod.GET,data);
    
    return request.request();
}

window.EPost = function(url: string,data?: any, contentType: ContentType = ContentType.MULTIPART_FORM_DATA){
    let request = new Request(url,contentType,RequestMethod.POST,data);
    
    return request.request();
}
window.ContentType = ContentType;